3.556 \(\int \frac{\sec ^4(c+d x)}{(a+b \tan (c+d x))^2} \, dx\)

Optimal. Leaf size=61 \[ -\frac{a^2+b^2}{b^3 d (a+b \tan (c+d x))}-\frac{2 a \log (a+b \tan (c+d x))}{b^3 d}+\frac{\tan (c+d x)}{b^2 d} \]

[Out]

(-2*a*Log[a + b*Tan[c + d*x]])/(b^3*d) + Tan[c + d*x]/(b^2*d) - (a^2 + b^2)/(b^3*d*(a + b*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0660522, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3506, 697} \[ -\frac{a^2+b^2}{b^3 d (a+b \tan (c+d x))}-\frac{2 a \log (a+b \tan (c+d x))}{b^3 d}+\frac{\tan (c+d x)}{b^2 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^4/(a + b*Tan[c + d*x])^2,x]

[Out]

(-2*a*Log[a + b*Tan[c + d*x]])/(b^3*d) + Tan[c + d*x]/(b^2*d) - (a^2 + b^2)/(b^3*d*(a + b*Tan[c + d*x]))

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \frac{\sec ^4(c+d x)}{(a+b \tan (c+d x))^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1+\frac{x^2}{b^2}}{(a+x)^2} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{1}{b^2}+\frac{a^2+b^2}{b^2 (a+x)^2}-\frac{2 a}{b^2 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=-\frac{2 a \log (a+b \tan (c+d x))}{b^3 d}+\frac{\tan (c+d x)}{b^2 d}-\frac{a^2+b^2}{b^3 d (a+b \tan (c+d x))}\\ \end{align*}

Mathematica [A]  time = 0.0607277, size = 51, normalized size = 0.84 \[ \frac{-\frac{a^2+b^2}{a+b \tan (c+d x)}-2 a \log (a+b \tan (c+d x))+b \tan (c+d x)}{b^3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^4/(a + b*Tan[c + d*x])^2,x]

[Out]

(-2*a*Log[a + b*Tan[c + d*x]] + b*Tan[c + d*x] - (a^2 + b^2)/(a + b*Tan[c + d*x]))/(b^3*d)

________________________________________________________________________________________

Maple [A]  time = 0.083, size = 78, normalized size = 1.3 \begin{align*}{\frac{\tan \left ( dx+c \right ) }{{b}^{2}d}}-{\frac{{a}^{2}}{d{b}^{3} \left ( a+b\tan \left ( dx+c \right ) \right ) }}-{\frac{1}{bd \left ( a+b\tan \left ( dx+c \right ) \right ) }}-2\,{\frac{a\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d{b}^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4/(a+b*tan(d*x+c))^2,x)

[Out]

tan(d*x+c)/b^2/d-1/d/b^3/(a+b*tan(d*x+c))*a^2-1/b/d/(a+b*tan(d*x+c))-2*a*ln(a+b*tan(d*x+c))/b^3/d

________________________________________________________________________________________

Maxima [A]  time = 1.06808, size = 81, normalized size = 1.33 \begin{align*} -\frac{\frac{a^{2} + b^{2}}{b^{4} \tan \left (d x + c\right ) + a b^{3}} + \frac{2 \, a \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{3}} - \frac{\tan \left (d x + c\right )}{b^{2}}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+b*tan(d*x+c))^2,x, algorithm="maxima")

[Out]

-((a^2 + b^2)/(b^4*tan(d*x + c) + a*b^3) + 2*a*log(b*tan(d*x + c) + a)/b^3 - tan(d*x + c)/b^2)/d

________________________________________________________________________________________

Fricas [B]  time = 2.00202, size = 440, normalized size = 7.21 \begin{align*} -\frac{2 \, b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - b^{2} +{\left (a^{2} \cos \left (d x + c\right )^{2} + a b \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) -{\left (a^{2} \cos \left (d x + c\right )^{2} + a b \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right )}{a b^{3} d \cos \left (d x + c\right )^{2} + b^{4} d \cos \left (d x + c\right ) \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+b*tan(d*x+c))^2,x, algorithm="fricas")

[Out]

-(2*b^2*cos(d*x + c)^2 - 2*a*b*cos(d*x + c)*sin(d*x + c) - b^2 + (a^2*cos(d*x + c)^2 + a*b*cos(d*x + c)*sin(d*
x + c))*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2) - (a^2*cos(d*x + c)^2 + a*b*co
s(d*x + c)*sin(d*x + c))*log(cos(d*x + c)^2))/(a*b^3*d*cos(d*x + c)^2 + b^4*d*cos(d*x + c)*sin(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{4}{\left (c + d x \right )}}{\left (a + b \tan{\left (c + d x \right )}\right )^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4/(a+b*tan(d*x+c))**2,x)

[Out]

Integral(sec(c + d*x)**4/(a + b*tan(c + d*x))**2, x)

________________________________________________________________________________________

Giac [A]  time = 1.35014, size = 96, normalized size = 1.57 \begin{align*} -\frac{\frac{2 \, a \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}} - \frac{\tan \left (d x + c\right )}{b^{2}} - \frac{2 \, a b \tan \left (d x + c\right ) + a^{2} - b^{2}}{{\left (b \tan \left (d x + c\right ) + a\right )} b^{3}}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+b*tan(d*x+c))^2,x, algorithm="giac")

[Out]

-(2*a*log(abs(b*tan(d*x + c) + a))/b^3 - tan(d*x + c)/b^2 - (2*a*b*tan(d*x + c) + a^2 - b^2)/((b*tan(d*x + c)
+ a)*b^3))/d